<template>
  <el-select placeholder="请选择" clearable :value="value" @change="$emit('input',$event)">
    <el-option v-for="item in menus" :key="item.id" :label="item.menu_name" :value="item.id.toString()">
    </el-option>
  </el-select>
</template>

<script>
  import { mapActions,mapState } from "vuex"
  export default {
    name: "parentMenu",
    props: {
      value:{
        type:String,
        default:""
      }
    },
    data() {
      return {
        options: [],
        
      }
    },
    computed:{
      ...mapState("menu",["menus"])
    },
     created() {
        this.getParentMenu();
    },
    methods:{
      ...mapActions("menu",["getParentMenu"])
    }
  }
</script>

<style>
</style>
